#include "stdafx.h"
#include "BasicTree.h"

BasicTree::BasicTree(const EEntityType& entity_type) : Entity(entity_type)
{
}


BasicTree::~BasicTree(void)
{
}

void BasicTree::Init(SceneObject* scene_object, Grid* grid)
{
	m_scene_object = scene_object;

}

void BasicTree::Update(float deltatime)
{
	// Update tree here
	m_scene_object->m_transform = DirectX::XMMatrixRotationRollPitchYaw(m_rotation.x, m_rotation.y, m_rotation.z) * DirectX::XMMatrixTranslation(m_position.x, m_position.y, m_position.z);
	
	// Move bounding sphere with entity
	m_scene_object->m_bounding_sphere.m_position.x = m_position.x;
	m_scene_object->m_bounding_sphere.m_position.y = m_position.y;
	m_scene_object->m_bounding_sphere.m_position.z = m_position.z;


}